import React from "react";
import { useLocation, Outlet } from 'umi';
import './index.less';
import PageLayout from "./PageLayout";

export default function Layout() {

const location = useLocation();
  if (location.pathname === '/login') {
    return (
      <div className="_layout-wrapper">
        <Outlet />
      </div>
    );
  }
  
  return (
    <div className="_layout-wrapper">
      <PageLayout><Outlet /></PageLayout>     
    </div>
  );
}
